/**
 *
 */
package com.changwu.cwbase.util;

import android.app.ProgressDialog;

import com.blankj.utilcode.util.Utils;


/**
 * 弹出窗口帮助
 *
 * @author zhuft
 * @version 1.0
 * 2013-10-22
 */
public class AppDialogUtil {
    public static ProgressDialog progressDialog;
    public static void showProgressDialog() {
        showProgressDialog("正在加载...");
    }
    public static void showProgressDialog(String msg) {
        try {
            dismissProgressDialog();
            progressDialog = new ProgressDialog(Utils.getApp());
            progressDialog.setIndeterminate(false);
            progressDialog.setMessage(msg);
            progressDialog.setCanceledOnTouchOutside(false);
            progressDialog.setCancelable(true);
            progressDialog.show();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public static void dismissProgressDialog() {
        if (progressDialog != null) {
            progressDialog.dismiss();
        }
    }
}